package blackitheima1.ObjectTest.test2;
//重写toString 方法 equals方法
public class Demo2 {
    public static void main(String[] args) {
        Student s=new Student("鲁智深",25);
        Student s1=new Student("鲁智深",25);
        System.out.println(s);
        System.out.println(s.toString());

        //重写equals方法
        System.out.println(s==s1);
        System.out.println(s.equals(s1));
    }
}
